{% extends "base.html" %}
{% import editor_macro(request) as editor %}

{% block head %}
    {{ editor.head() }}
{% endblock head %}

{% block title %}1:1设置联系人{% endblock title %}
{% block subtitle %}1:1设置联系人{% endblock subtitle %}

{% block content %}
    <form name="fqaconfigform" id="fqaconfigform" action="{{ url_for('qa_config_update') }}" method="post" onsubmit="return fqaconfigform_submit(this);" autocomplete="off">
        <input type="hidden" id="token" name="token" value="" >
    
        <section id="anc_cf_qa_config">
            <h2 class="h2_frm">1:1设置联系人</h2>
            <div class="tbl_frm01 tbl_wrap">
                <table>
                    <caption>1:1设置联系人</caption>
                    <colgroup>
                        <col class="grid_4">
                        <col>
                    </colgroup>
                    <tbody>
                        <tr>
                            <th scope="row"><label for="qa_title">标题<strong class="blind">必不可少的</strong></label></th>
                            <td>
                                <input type="text" name="qa_title" value="{{ qa_config.qa_title|default('1:1The enout') }}" id="qa_title" required="" class="required frm_input" size="40">
                                <a href="{{ url_for('qa_list') }}" class="btn_frmline">1:1门的门</a>
                            </td>
                        </tr>
                        <tr>
                            <th scope="row"><label for="qa_category">分类<strong class="blind">必不可少的</strong></label></th>
                            <td>
                                <span class="frm_info">在分类和分类之间 | 请分开. (是: 提问|答案) 作为第一个 #不要进入. (是: #提问|#答案 [X])</span>
                                <input type="text" name="qa_category" value="{{ qa_config.qa_category }}" id="qa_category" required="" class="required frm_input" size="70">
                            </td>
                        </tr>
                        <tr>
                            <th scope="row">电子邮件输入</th>
                            <td>
                                <input type="checkbox" name="qa_use_email" value="1" id="qa_use_email" {{ "checked" if qa_config.qa_use_email else "" }}> <label for="qa_use_email">被看见</label>
                                <input type="checkbox" name="qa_req_email" value="1" id="qa_req_email" {{ "checked" if qa_config.qa_req_email else "" }}> <label for="qa_req_email">重要输入</label>
                            </td>
                        </tr>
                        <tr>
                            <th scope="row">手机输入</th>
                            <td>
                                <input type="checkbox" name="qa_use_hp" value="1" id="qa_use_hp" {{ "checked" if qa_config.qa_use_hp else "" }}> <label for="qa_use_hp">被看见</label>
                                <input type="checkbox" name="qa_req_hp" value="1" id="qa_req_hp" {{ "checked" if qa_config.qa_req_hp else "" }}> <label for="qa_req_hp">重要输入</label>
                            </td>
                        </tr>
                        <tr>
                            <th scope="row"><label for="qa_use_sms">SMS 通知</label></th>
                            <td>
                                <span class="frm_info">如果您使用手机输入，则在注册联系人时注册的人。 SMS 让您选择接收通知.<br>SMS 设置默认环境以使用通知 &gt; <a href="/admin/config_form#anc_cf_sms">SMS 设置</a>你必须这么做..</span>
                                <select name="qa_use_sms" id="qa_use_sms">
                                    <option value="0" {{ get_selected(qa_config.qa_use_sms, 0) }}>未使用</option>
                                    <option value="1" {{ get_selected(qa_config.qa_use_sms, 1) }}>已使用</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <th scope="row"><label for="qa_send_number">SMS 呼叫的号码</label></th>
                            <td>
                                <span class="frm_info">SMS 它在发送通知时用作数字.</span>
                                <input type="text" name="qa_send_number" value="{{ qa_config.qa_send_number }}" id="qa_send_number" class="frm_input" size="30">
                            </td>
                        </tr>
                        <tr>
                            <th scope="row"><label for="qa_admin_hp">经理手机号码</label></th>
                            <td>
                                <span class="frm_info">如果您输入经理的手机号码，请联系您在注册时注册的号码 SMS 将发送通知.<br>SMS 如果您不使用通知，则不会发送通知.</span>
                                <input type="text" name="qa_admin_hp" value="{{ qa_config.qa_admin_hp }}" id="qa_admin_hp" class="frm_input" size="30">
                            </td>
                        </tr>
                        <tr>
                            <th scope="row"><label for="qa_admin_email">经理电子邮件</label></th>
                            <td>
                                <span class="frm_info">当您输入管理员电子邮件时，您将在注册联系人时收到您注册的电子邮件通知。.</span>
                                <input type="text" name="qa_admin_email" value="{{ qa_config.qa_admin_email }}" id="qa_admin_email" class="frm_input" size="50">
                            </td>
                        </tr>
                        <tr>
                            <th scope="row"><label for="qa_use_editor">DHTML 使用设计器</label></th>
                            <td>
                                <span class="frm_info">写内容时 DHTML 设置是否将其用作编辑功能. 它可能不会被应用取决于皮肤.</span>
                                <select name="qa_use_editor" id="qa_use_editor">
                                    <option value="0" {{ get_selected(qa_config.qa_use_editor, 0) }}>未使用</option>
                                    <option value="1" {{ get_selected(qa_config.qa_use_editor, 1) }}>已使用</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <th scope="row"><label for="qa_subject_len">标题长度<strong class="blind"> 必不可少的</strong></label></th>
                            <th scope="row"><label for="qa_subject_len">标题长度<strong class="blind"> 必不可少的</strong></label></th>
                            <td>
                                <span class="frm_info">列表中的标题字母数</span>
                                <input type="text" name="qa_subject_len" value="{{ qa_config.qa_subject_len|default(60) }}" id="qa_subject_len" required="" class="required numeric frm_input" size="4">
                            </td>
                        </tr>
                        <tr>
                            <th scope="row"><label for="qa_mobile_subject_len">移动标题长度<strong class="blind"> 必不可少的</strong></label></th>
                            <td>
                                <span class="frm_info">列表中的标题字母数</span>
                                <input type="text" name="qa_mobile_subject_len" value="{{ qa_config.qa_mobile_subject_len|default(40) }}" id="qa_mobile_subject_len" required="" class="required numeric frm_input" size="4">
                            </td>
                        </tr>
                        <tr>
                            <th scope="row"><label for="qa_page_rows">每页的列表编号<strong class="blind"> 必不可少的</strong></label></th>
                            <td>
                                <input type="text" name="qa_page_rows" value="{{ qa_config.qa_page_rows|default(15) }}" id="qa_page_rows" required="" class="required numeric frm_input" size="4">
                            </td>
                        </tr>
                        <tr>
                            <th scope="row"><label for="qa_mobile_page_rows">每个移动页面的列表编号<strong class="blind"> 必不可少的</strong></label></th>
                            <td>
                                <input type="text" name="qa_mobile_page_rows" value="{{ qa_config.qa_mobile_page_rows|default(10) }}" id="qa_mobile_page_rows" required="" class="required numeric frm_input" size="4">
                            </td>
                        </tr>
                        <tr>
                            <th scope="row"><label for="qa_image_width">图像宽度大小<strong class="blind"> 必不可少的</strong></label></th>
                            <td>
                                <span class="frm_info">从公告板输出的图像的宽度大小</span>
                                <input type="text" name="qa_image_width" value="{{ qa_config.qa_image_width|default(150) }}" id="qa_image_width" required="" class="required numeric frm_input" size="4"> 像素
                            </td>
                        </tr>
                        <tr>
                            <th scope="row"><label for="qa_upload_size">文件上传容量<strong class="blind"> 必不可少的</strong></label></th>
                            <td>
                                <span class="frm_info">最大值 40M 可以上传, 1 MB = 1,048,576 bytes</span>
                                每个上传一个文件
                                <input type="text" name="qa_upload_size" value="{{ qa_config.qa_upload_size|default(1048576) }}" id="qa_upload_size" required="" class="required numeric frm_input" size="10"> bytes 下面
                            </td>
                        </tr>
                        <tr>
                            <th scope="row"><label for="qa_content_head">热门内容</label></th>
                            <td>{{ editor.body("qa_content_head", qa_config.qa_content_head) }}</td>
                        </tr>
                        <tr>
                            <th scope="row"><label for="qa_content_tail">底部内容</label></th>
                            <td>{{ editor.body("qa_content_tail", qa_config.qa_content_tail) }}</td>
                        </tr>
                        <tr>
                            <th scope="row"><label for="qa_mobile_content_head">移动热门内容</label></th>
                            <td>{{ editor.body("qa_mobile_content_head", qa_config.qa_mobile_content_head) }}</td>
                        </tr>
                        <tr>
                            <th scope="row"><label for="qa_mobile_content_tail">移动设备底部内容</label></th>
                            <td>{{ editor.body("qa_mobile_content_tail", qa_config.qa_mobile_content_tail) }}</td>
                        </tr>
                        <tr>
                            <th scope="row"><label for="qa_insert_content">写作基本内容</label></th>
                            <td>{{ editor.body("qa_insert_content", qa_config.qa_insert_content) }}</td>
                        </tr>
                        {% for i in range(1, 6) %}
                        <tr>
                            <th scope="row">额外字段{{ i }}</th>
                            <td class="td_extra">
                                <label for="qa_{{ i }}_subj">额外字段 {{ i }} 标题</label>
                                <input type="text" name="qa_{{ i }}_subj" id="qa_{{ i }}_subj" value="{{ getattr(qa_config, "qa_" ~ i ~ "_subj", "")|default('', true) }}" class="frm_input">
                                <label for="qa_{{ i }}">额外字段 {{ i }} 数值</label>
                                <input type="text" name="qa_{{ i }}" value="{{ getattr(qa_config, "qa_" ~ i, "")|default('', true) }}" id="qa_{{ i }}" class="frm_input">
                            </td>
                        </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>
        </section>
    
        <div class="btn_fixed_top">
            <input type="submit" value="检查" class="btn_submit btn" accesskey="s">
        </div>
    
    </form>
    
    <script>
        function fqaconfigform_submit(f) {
            f.token.value = generate_token();

            return true;
        }
    </script>
{% endblock content %}
